package com.vcredit.bird.enumtype;

/**
 * 借记卡认证的银行枚举
 * @author zhaoqi01
 *
 */
public enum BankEnum {

	CCB("CCB", "BANKLIST/JIANHANG", "中国建设银行"), 
	ICBC("ICBC", "BANKLIST/GONGHANG", "中国工商银行"),
	ABCB("ABCB", "BANKLIST/NONGHANG", "中国农业银行"),
	BOC("BOC", "BANKLIST/ZHONGHANG", "中国银行"),
	CEB("CEB", "BANKLIST/GUANGDA",	"中国光大银行"),
	CMB("CMB", "BANKLIST/ZHAOHANG", "招商银行"),
	CMBC("CMBC", "BANKLIST/MINHANG", "中国民生银行"),
	ECTIC("ECTIC", "BANKLIST/ZHONGXIN", "中信银行"),
	CGB("CGB", "BANKLIST/GUANGFA", "广东发展银行"),
	SPDB("SPDB", "BANKLIST/PUFA", "浦东发展银行"),
	PINGAN("PINGAN", "BANKLIST/PINGAN", "平安银行股份有限公司"),
	CIB("CIB", "BANKLIST/XINGYE", "兴业银行"),
	YOUZHENG("YOUZHENG", "BANKLIST/YOUHANG", "中国邮政储蓄银行");	
	
	private String code;
	private String vbsEnum;
	private String desc;

	private BankEnum(String code, String vbsEnum, String desc) {
		this.code = code;
		this.vbsEnum = vbsEnum;
		this.desc = desc;
	}

	public String getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}

	public String getVbsEnum() {
		return vbsEnum;
	}

//	public static BankEnum getBankByName(String bankName) {
//		for (BankEnum bank : BankEnum.values()) {
//			if (bankName.equals(bank.getDesc())) {
//				return bank;
//			}
//		}
//		return null;
//	}
	
	public static String getVbsByCode(String code) {
		for (BankEnum bank : BankEnum.values()) {
			if (code.equals(bank.getCode())) {
				return bank.getVbsEnum();
			}
		}
		return null;
	}
	
	public static String getDescByCode(String code) {
		for (BankEnum bank : BankEnum.values()) {
			if (code.equals(bank.getCode())) {
				return bank.getDesc();
			}
		}
		return null;
	}
}
